<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>N6_1F储位管理登录</title>
<%@include file="/WEB-INF/common/css.jsp"%>
<style>
html, body {
	width: 100%;
	height: 100%;
	background-image: url(${base}/assets/image/member_login_bg.jpg);
	background-repeat: no-repeat;
	background-size: 100% 100%;
	position: relative;
	perspective: 800px;
  	transform-style: preserve-3d;
}
.login{
	position: absolute;
	padding-top: 50px;
	width: 500px;
	left: 32%;
    top: 160px;
}

.logincard{
	border: 2px solid #ccc;
	border-radius: 14px;
	overflow: hidden;
}
.logincard_header{
	height: 100px;
	text-align: center;
	line-height:100px;
	font-size: 24px;
	font-weight: bold;
	-webkit-box-reflect:below 10;
	text-transform:uppercase;
}
</style>
<%@include file="/WEB-INF/common/topjs.jsp"%>
</head>
<body>
	<div class="login">
			<div class="layui-card logincard">
				<div class="layui-card-header layui-bg-cyan logincard_header">N6_1F储位管理 - 用户登录</div>
				<div class="layui-card-body  layui-bg-cyan">
					<form class="layui-form" action="">
						<div class="layui-form-item">
							<label class="layui-form-label">工号</label>
							<div class="layui-input-block">
								<input type="text" name="no" required lay-verify="required"
									placeholder="请输入工号" autocomplete="off" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">密码</label>
							<div class="layui-input-block">
								<input type="password" name="password" required
									lay-verify="required" placeholder="请输入密码" autocomplete="off"
									class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<div class="layui-input-block">
								<button class="layui-btn" lay-submit lay-filter="formDemo">登录</button>
								<button type="reset" class="layui-btn layui-btn-primary">重置</button>
							</div>
						</div>
					</form>
			</div>
		</div>
	</div>
</body>
<%@include file="/WEB-INF/common/bottomjs.jsp"%>
<script type="text/javascript">
    $(function(){
	  var form = layui.form;
	  //监听提交
	  form.on('submit(formDemo)', function(data){
		var hqlhHtml = "<img src='${base}/assets/image/alertemoj/huosudenglv.gif' /><br>";
		hqlhHtml += "<h3 style='text-align: center;font-size: 23px;margin-top: 27px;color:#149e5e;font-weight: bold'>系统正在光速登录，请稍后</h3>";
			
		var hqlhAreat = layer.open({
			title : '消息提示',
			content : hqlhHtml,
			btn:[],
			closeBtn: 0
		});
		
	    $.ajax({
	    	"url": "${base}/api/user/login.api",
	    	"type":"post",
	    	'headers': Apicheck.getHeaders(),
	    	"data":{"no":data.field.no, "password":data.field.password},
	    	"success":function(result){
	    		layer.close(hqlhAreat);
	    		if(result.code == 1001){
	    			layer.msg('呀吼，登录成功了', {icon: 6});
	    			location.href="${base}/index.html";
	    		}else{
	    			layer.msg(result.msg, {icon: 5,anim:6}); 
	    		}
	    	}
	    });
	    return false;
	  });
	});
</script>
</html>